﻿<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>管理后台</title> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"> <link href="/sitefiles/assets/images/favicon.png" rel="icon" type="image/png"> <link href="/sitefiles/assets/css/font-awesome-4.7.0.min.css?v=1604819048476" rel="stylesheet" type="text/css"> <link href="/sitefiles/assets/css/ionicons-2.0.0.min.css?v=1604819048476" rel="stylesheet" type="text/css"> <link href="/sitefiles/assets/lib/elementui/themechalk/index.css?v=1604819048476" rel="stylesheet" type="text/css"> <link href="/sitefiles/assets/css/element-ui.css?v=1604819048476" rel="stylesheet" type="text/css"> <style> .el-main {
      padding: 5px 5px 20px 5px;
      overflow: hidden;
    }
    #commands .el-button {
      margin-bottom: 5px;
    }
    #commands .el-button+.el-button {
      margin-left: 0;
    }
    .table-expand-form .el-form-item__label {
      width: 120px;
      color: #909399;
    }
    .table-expand-form .el-form-item {
      margin-right: 0;
      margin-bottom: 0;
      width: 50%;
    } </style> </head> <body> <div id="main"> <div v-if="this.pageLoad" style="display: none" :style="{display: ''}"> <el-container> <el-aside width="100px"> <el-tabs v-model="searchForm.searchType" tab-position="left" style="height: 100%;" v-on:tab-click="btnTabClick"> <el-tab-pane label="全部" name="All"></el-tab-pane> <el-tab-pane label="我发布的" name="Admin"></el-tab-pane> <el-tab-pane label="用户投稿" name="User"></el-tab-pane> </el-tabs> </el-aside> <el-container> <el-main> <el-row> <el-col :span="20"> <el-form ref="searchForm" :model="searchForm" :inline="true" size="small" label-width="100px"> <el-form-item label="栏目" prop="channelIds" :rules="{ required: true, message: '请选择栏目' }"> <el-cascader ref="channelIds" v-model="searchForm.channelIds" :options="[root]" :props="{ multiple: true, checkStrictly: true }" filterable placeholder="请选择栏目"> <span slot-scope="{ node, data }"> {{ node.label }} ({{ data.count }}) </span> </el-cascader> </el-form-item> <el-form-item> <el-checkbox v-model="searchForm.isAllContents" label="包含子栏目"></el-checkbox> </el-form-item> <el-form-item> <el-popover placement="top" width="580" trigger="click"> <el-form size="mini" :model="searchForm" style="margin-top: 10px;" label-width="80px"> <el-form-item label="审核状态"> <el-checkbox-group v-model="searchForm.checkedLevels"> <el-checkbox v-for="level in checkedLevels" v-key="level.label" :label="level.label">{{level.text}}</el-checkbox> </el-checkbox-group> </el-form-item> <el-form-item label="内容属性"> <el-checkbox label="置顶" v-model="searchForm.isTop"></el-checkbox> <el-checkbox label="推荐" v-model="searchForm.isRecommend"></el-checkbox> <el-checkbox label="热点" v-model="searchForm.isHot"></el-checkbox> <el-checkbox label="醒目" v-model="searchForm.isColor"></el-checkbox> </el-form-item> <el-form-item label="内容分组" v-if="groupNames && groupNames.length > 0"> <el-checkbox-group v-model="searchForm.groupNames"> <el-checkbox v-for="groupName in groupNames" v-key="groupName" :label="groupName">{{groupName}}</el-checkbox> </el-checkbox-group> </el-form-item> <el-form-item label="内容标签" v-if="tagNames && tagNames.length > 0"> <el-select ref="tagNames" v-model="searchForm.tagNames" multiple="multiple" filterable default-first-option style="width: 100%;" placeholder="请选择内容标签"> <el-option v-for="tagName in tagNames" :key="tagName" :label="tagName" :value="tagName"> </el-option> </el-select> </el-form-item> </el-form> <div slot="reference" class="el-dropdown" style="float: right; margin-right: 10px;"> <el-badge v-if="isFiltered" is-dot class="item"> <span style="cursor: pointer;"> 筛选<i class="el-icon-arrow-down el-icon--right"></i> </span> </el-badge> <span v-else style="cursor: pointer;"> 筛选<i class="el-icon-arrow-down el-icon--right"></i> </span> </div> </el-popover> </el-form-item> </el-form> </el-col> <el-col :span="4" align="right"> <el-form :inline="true" size="small" label-width="100px"> <el-form-item> <el-popover id="sortColumns" placement="top" width="360" trigger="click"> <div> 设置显示列 </div> <el-table :data="columns" size="mini" style="width: 100%; overflow: auto; max-height: 500px !important;"> <el-table-column prop="displayName"></el-table-column> <el-table-column prop="attributeName"></el-table-column> <el-table-column align="right" width="80"> <template slot-scope="scope"> <el-switch v-model="scope.row.isList" :disabled="scope.row.attributeName === 'Title'" v-on:change="handleColumnsChange" size="mini"> </el-switch> </template> </el-table-column> </el-table> <div slot="reference" class="el-dropdown" style="float: right;"> <span style="cursor: pointer;"> 显示列<i class="el-icon-arrow-down el-icon--right"></i> </span> </div> </el-popover> </el-form-item> </el-form> </el-col> <el-col :span="24"> <el-form :inline="true" size="small" label-width="100px"> <el-form-item label="添加日期"> <el-col :span="11"> <el-date-picker type="datetime" placeholder="选择开始日期" v-model="searchForm.startDate" style="width: 100%;"></el-date-picker> </el-col> <el-col class="line" :span="2" align="center">-</el-col> <el-col :span="11"> <el-date-picker type="datetime" placeholder="选择结束日期" v-model="searchForm.endDate" style="width: 100%;"></el-date-picker> </el-col> </el-form-item> </el-form> </el-col> <el-col :span="24"> <el-form size="small" label-width="100px"> <el-form-item v-for="column in searchColumns" :key="column.attributeName" :label="column.displayName"> <el-input v-model="column.value" placeholder="请输入搜索关键词"> <el-button slot="append" v-on:click="btnSelectColumnClick(column)" icon="el-icon-remove-outline"></el-button> </el-input> </el-form-item> </el-form> <el-form size="small" label-width="100px"> <el-form-item> <el-popover placement="top" width="400" trigger="click"> <div> <el-tag v-for="column in columns" v-if="column.isSearchable" :key="column.attributeName" type="primary" style="cursor: pointer; margin: 0 3px 6px 0;" v-on:click="btnSelectColumnClick(column)" :effect="getColumnEffect(column)"> {{ column.displayName + '(' + column.attributeName + ')' }} </el-tag> </div> <el-button slot="reference" size="mini" icon="el-icon-circle-plus-outline"> 添加搜索项 </el-button> </el-popover> </el-form-item> </el-form> </el-col> </el-row> <div style="height: 10px"></div> <el-divider></el-divider> <el-row align="center" style="margin-right: 5px; margin-top: 10px;"> <el-col :span="24" align="center"> <el-button size="small" type="primary" v-on:click="btnSearchClick">搜 索</el-button> </el-col> </el-row> </el-main> </el-container> </el-container> <el-container v-if="pageContents"> <el-main> <el-divider></el-divider> <div style="height: 10px;"></div> <div id="commands"> <el-button size="mini" plain type="primary" icon="el-icon-circle-plus-outline" :disabled="!permissions.isAdd" v-on:click="btnAddClick"> 添加 </el-button> <el-dropdown size="mini" v-on:command="btnImportClick"> <el-button size="mini" :disabled="!permissions.isAdd"> 导入<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="Word"><i class="el-icon-tickets"></i>导入Word</el-dropdown-item> <el-dropdown-item command="Import"><i class="el-icon-upload2"></i>批量导入</el-dropdown-item> </el-dropdown-menu> </el-dropdown> <el-button size="mini" icon="el-icon-star-off" :disabled="total === 0 || !permissions.isEdit || !isContentChecked" v-on:click="btnLayerClick({title: '批量设置属性', name: 'Attributes', width: 500, height: 320, withContents: true})"> 属性 </el-button> <el-button size="mini" icon="el-icon-right" :disabled="total === 0 || !permissions.isTranslate || !isContentChecked" v-on:click="btnLayerClick({title: '批量转移', name: 'Translate', withContents: true})"> 转移 </el-button> <el-button size="mini" icon="el-icon-sort" :disabled="total === 0 || !permissions.isEdit || !isContentChecked" v-on:click="btnLayerClick({title: '批量排序', name: 'Taxis', width: 450, height: 280, withContents: true})"> 排序 </el-button> <el-button size="mini" icon="el-icon-delete" :disabled="total === 0 || !permissions.isDelete || !isContentChecked" v-on:click="btnLayerClick({title: '批量删除', name: 'Delete', full: true, withContents: true})"> 删除 </el-button> <el-button size="mini" icon="el-icon-circle-check" :disabled="total === 0 || !permissions.isCheck || !isContentChecked" v-on:click="btnLayerClick({title: '批量审核', name: 'Check', full: true, withContents: true})"> 审核 </el-button> <el-button size="mini" icon="el-icon-magic-stick" :disabled="total === 0 || !permissions.isCreate || !isContentChecked" v-on:click="btnCreateClick"> 生成 </el-button> <el-dropdown size="mini" v-on:command="btnMoreClick"> <el-button size="mini" :disabled="total === 0"> 更多<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="Group" :disabled="total === 0 || !permissions.isEdit || !isContentChecked"><i class="el-icon-files"></i>设置分组</el-dropdown-item> <el-dropdown-item command="Tag" :disabled="total === 0 || !permissions.isEdit || !isContentChecked"><i class="el-icon-collection-tag"></i>设置标签</el-dropdown-item> <el-dropdown-item command="Copy" :disabled="total === 0 || !permissions.isTranslate || !isContentChecked"><i class="el-icon-copy-document"></i>复制内容</el-dropdown-item> <el-dropdown-item command="ExportAll"><i class="el-icon-download"></i>导出全部</el-dropdown-item> <el-dropdown-item command="ExportSelected" :disabled="!isContentChecked"><i class="el-icon-download"></i>导出选中</el-dropdown-item> <el-dropdown-item command="Arrange" :disabled="!permissions.isArrange"><i class="el-icon-sort"></i>整理排序</el-dropdown-item> <el-dropdown-item command="Hits" :disabled="!permissions.isEdit || !isContentChecked"><i class="el-icon-mouse"></i>设置点击量</el-dropdown-item> </el-dropdown-menu> </el-dropdown> </div> <div style="height: 10px;"></div> <el-table :data="pageContents" border ref="multipleTable" style="width: 100%;" :max-height="tableMaxHeight" size="medium" row-key="id" stripe :row-class-name="tableRowClassName" v-on:selection-change="handleSelectionChange" v-on:row-click="toggleSelection"> <el-table-column type="expand" width="25" align="right"> <template slot-scope="scope"> <el-form size="mini" label-position="left" inline class="table-expand-form"> <el-form-item v-for="column in columns" :key="column.attributeName" v-if="column.attributeName !== 'Title'" :label="column.displayName"> <!-- ChannelId --> <template v-if="column.attributeName === 'ChannelId'"> {{scope.row.channelName}} </template> <!-- GroupNames --> <template v-else-if="column.attributeName === 'GroupNames'"> <template v-if="scope.row.groupNames && groupNames" v-for="groupName in scope.row.groupNames"> <el-tag v-if="groupNames.indexOf(groupName) !== -1" :key="groupName" size="mini" type="info"> {{ groupName }} </el-tag> </template> </template> <!-- TagNames --> <template v-else-if="column.attributeName === 'TagNames'"> <template v-if="scope.row.tagNames && tagNames" v-for="tagName in scope.row.tagNames"> <el-tag v-if="tagNames.indexOf(tagName) !== -1" :key="tagName" size="mini" type="info"> {{ tagName }} </el-tag> </template> </template> <!-- ImageUrl --> <template v-else-if="column.attributeName === 'ImageUrl'"> <el-link :underline="false" :href="scope.row.imageUrl" target="_blank" v-on:click.stop.native> <el-image v-if="scope.row.imageUrl" :src="scope.row.imageUrl" style="max-width: 100px; max-height: 100px"></el-image> </el-link> </template> <!-- LinkUrl --> <template v-else-if="column.attributeName === 'LinkUrl'"> <el-link v-if="scope.row.linkUrl" :underline="false" type="primary" :href="scope.row.linkUrl" target="_blank" v-on:click.stop.native>{{scope.row.linkUrl}}</el-link> </template> <!-- AdminId --> <template v-else-if="column.attributeName === 'AdminId'"> <el-link v-if="scope.row.adminId" :underline="false" type="primary" v-on:click.stop.native="btnAdminClick(scope.row.adminId)">{{scope.row.adminName}}</el-link> </template> <!-- LastEditAdminId --> <template v-else-if="column.attributeName === 'LastEditAdminId'"> <el-link v-if="scope.row.lastEditAdminId" :underline="false" type="primary" v-on:click.stop.native="btnAdminClick(scope.row.lastEditAdminId)">{{scope.row.lastEditAdminName}}</el-link> </template> <!-- UserId --> <template v-else-if="column.attributeName === 'UserId'"> <el-link v-if="scope.row.userId" :underline="false" type="primary" v-on:click.stop.native="btnUserClick(scope.row.userId)">{{scope.row.userName}}</el-link> </template> <!-- CheckAdminId --> <template v-else-if="column.attributeName === 'CheckAdminId'"> <el-link v-if="scope.row.checkAdminId" :underline="false" type="primary" v-on:click.stop.native="btnAdminClick(scope.row.checkAdminId)">{{scope.row.checkAdminName}}</el-link> </template> <!-- SourceId --> <template v-else-if="column.attributeName === 'SourceId'"> {{scope.row.sourceName}} </template> <!-- Others --> <template v-else> <span v-html="scope.row.getEntityValue(column.attributeName)"></span> </template> </el-form-item> </el-form> </template> </el-table-column> <el-table-column type="selection" width="45" align="center"></el-table-column> <el-table-column v-for="column in columns" v-if="column.isList" :key="column.attributeName" :label="column.displayName" :width="getColumnWidth(column)" :min-width="getColumnMinWidth(column)" show-overflow-tooltip resizable> <template slot-scope="scope"> <!-- Title --> <template v-if="column.attributeName === 'Title'"> <el-link v-if="scope.row.checked && scope.row.channelId > 0" type="primary" :underline="false" :href="getContentUrl(scope.row)" target="_blank" v-html="scope.row.title" v-on:click.stop.native></el-link> <el-link v-else type="primary" :underline="false" v-on:click="btnTitleClick(scope.row)" v-html="scope.row.title" v-on:click.stop.native></el-link> <!-- top --> <el-tooltip v-if="scope.row.top" effect="light" content="置顶" placement="top"> <el-link size="mini" :underline="false" type="danger"><i class="el-icon-top"></i></el-link> </el-tooltip> <!-- recommend --> <el-tooltip v-if="scope.row.recommend" effect="light" content="推荐" placement="top"> <i class="el-icon-star-off"></i> </el-tooltip> <!-- hot --> <el-tooltip v-if="scope.row.hot" effect="light" content="热点" placement="top"> <i class="el-icon-news"></i> </el-tooltip> <!-- color --> <el-tooltip v-if="scope.row.color" effect="light" content="醒目" placement="top"> <i class="el-icon-view"></i> </el-tooltip> <!-- imageUrl --> <el-tooltip v-if="scope.row.imageUrl" effect="light" content="图片" placement="top"> <el-popover v-if="scope.row.imageUrl" width="400" trigger="hover"> <el-image :src="scope.row.imageUrl"></el-image> <el-link slot="reference" :underline="false"> <i class="el-icon-picture-outline"></i> </el-link> </el-popover> </el-tooltip> <!-- video --> <el-tooltip v-if="scope.row.videoUrl" effect="light" content="视频" placement="top"> <el-link :underline="false" :href="scope.row.videoUrl" target="_blank" v-on:click.stop> <i class="el-icon-video-play"></i> </el-link> </el-tooltip> <!-- fileUrl --> <el-tooltip v-if="scope.row.fileUrl" effect="light" content="附件" placement="top"> <el-link :underline="false" :href="scope.row.fileUrl" target="_blank" v-on:click.stop> <i class="el-icon-document"></i> </el-link> </el-tooltip> <!-- linkUrl --> <el-tooltip v-if="scope.row.linkUrl" effect="light" content="外部链接" placement="top"> <el-link :underline="false" :href="scope.row.linkUrl" target="_blank" v-on:click.stop.native title="外部链接"> <i class="el-icon-link"></i> </el-link> </el-tooltip> </template> <!-- ChannelId --> <template v-else-if="column.attributeName === 'ChannelId'"> {{scope.row.channelName}} </template> <!-- GroupNames --> <template v-else-if="column.attributeName === 'GroupNames'"> <template v-if="scope.row.groupNames && groupNames" v-for="groupName in scope.row.groupNames"> <el-tag v-if="groupNames.indexOf(groupName) !== -1" :key="groupName" size="mini" type="info"> {{ groupName }} </el-tag> </template> </template> <!-- TagNames --> <template v-else-if="column.attributeName === 'TagNames'"> <template v-if="scope.row.tagNames && tagNames" v-for="tagName in scope.row.tagNames"> <el-tag v-if="tagNames.indexOf(tagName) !== -1" :key="tagName" size="mini" type="info"> {{ tagName }} </el-tag> </template> </template> <!-- ImageUrl --> <template v-else-if="column.attributeName === 'ImageUrl'"> <el-link :underline="false" :href="scope.row.imageUrl" target="_blank" v-on:click.stop.native> <el-image v-if="scope.row.imageUrl" :src="scope.row.imageUrl" style="max-width: 100px; max-height: 100px"></el-image> </el-link> </template> <!-- LinkUrl --> <template v-else-if="column.attributeName === 'LinkUrl'"> <el-link v-if="scope.row.linkUrl" :underline="false" type="primary" :href="scope.row.linkUrl" target="_blank" v-on:click.stop.native>{{scope.row.linkUrl}}</el-link> </template> <!-- AdminId --> <template v-else-if="column.attributeName === 'AdminId'"> <el-link v-if="scope.row.adminId" :underline="false" type="primary" v-on:click.stop.native="btnAdminClick(scope.row.adminId)">{{scope.row.adminName}}</el-link> </template> <!-- LastEditAdminId --> <template v-else-if="column.attributeName === 'LastEditAdminId'"> <el-link v-if="scope.row.lastEditAdminId" :underline="false" type="primary" v-on:click.stop.native="btnAdminClick(scope.row.lastEditAdminId)">{{scope.row.lastEditAdminName}}</el-link> </template> <!-- UserId --> <template v-else-if="column.attributeName === 'UserId'"> <el-link v-if="scope.row.userId" :underline="false" type="primary" v-on:click.stop.native="btnUserClick(scope.row.userId)">{{scope.row.userName}}</el-link> </template> <!-- CheckAdminId --> <template v-else-if="column.attributeName === 'CheckAdminId'"> <el-link v-if="scope.row.checkAdminId" :underline="false" type="primary" v-on:click.stop.native="btnAdminClick(scope.row.checkAdminId)">{{scope.row.checkAdminName}}</el-link> </template> <!-- SourceId --> <template v-else-if="column.attributeName === 'SourceId'"> {{scope.row.sourceName}} </template> <!-- Others --> <template v-else> <span v-html="scope.row.getEntityValue(column.attributeName)"></span> </template> </template> </el-table-column> <el-table-column fixed="right" align="center" width="70" show-overflow-tooltip label="状态"> <template slot-scope="scope"> <el-link :disabled="!permissions.isEdit" size="mini" :underline="false" v-on:click.stop.native="btnContentStateClick(scope.row.id)" :type="(scope.row.checked ? 'primary' : 'danger')"> {{ scope.row.state }} </el-link> </template> </el-table-column> <el-table-column v-if="menus" v-for="menu in menus" :key="menu.id" fixed="right" align="center" :width="getColumnWidth(menu.text)" show-overflow-tooltip> <template slot-scope="scope"> <el-link v-if="menus" :disabled="!permissions.isEdit" size="mini" type="primary" :underline="false" v-on:click.stop.native="btnMenuClick(menu, scope.row)"> <i v-if="menu.iconClass" :class="menu.iconClass"></i> {{ menu.text }} </el-link> </template> </el-table-column> <el-table-column fixed="right" align="center" width="60"> <template slot-scope="scope"> <el-link :disabled="!permissions.isEdit" size="mini" :underline="false" v-on:click.stop.native="btnEditClick(scope.row)" type="primary">编辑</el-link> </template> </el-table-column> </el-table> <el-row style="margin-top: 7px;"> <el-col :span="24" align="center"> <el-pagination size="mini" background v-on:current-change="handleCurrentChange" :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper" :total="total"> </el-pagination> </el-col> </el-row> </el-main> </el-container> </div> <div v-else :style="{top: ($(window).height()/2 - 30) + 'px'}" v-loading="true" element-loading-text="页面加载中"></div> </div> </body> </html> <script src="/sitefiles/assets/lib/es6-promise.auto.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/axios-0.17.1.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/core-js-3.6.5.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/lodash-4.17.10.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/jquery-1.9.1.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/layer/layer-3.1.1.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/sweetalert2-7.28.4.all.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/vue-2.5.16.min.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/lib/elementui/index.js?v=1604819048476"></script> <script src="/sitefiles/assets/js/admin.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/js/utils.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/js/cloud.js?v=1604819048476" type="text/javascript"></script> <script src="/sitefiles/assets/js/admin/cms/contentsSearch.js?v=1604819048476" type="text/javascript"></script> 